package com.lbd.system.dao;

import com.lbd.system.bean.Dictionary;
import com.lbd.system.bean.EventLog;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.io.Serializable;
import java.util.List;

/**
 * Created by WangYajie on 2016/9/12.
 */
public interface DictionaryRepository extends PagingAndSortingRepository<Dictionary, Serializable>, JpaSpecificationExecutor<Dictionary> {

    Dictionary findDictionaryByCode(String code);

//    List<Dictionary> findDictionaryByParentId(String parentId);

    List<Dictionary> findDictionaryByParent(Dictionary parent);

    //    List<Dictionary> findDictionaryByParentId(String id);
    List<Dictionary> findDictionaryByCodeIn(String[] keys);
}
